//
//  SearchVC.m
//  AroundTheWorld
//
//  Created by dllo on 16/5/31.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "SearchVC.h"
#import "HotTravellTableViewCell.h"
#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

static NSString *const hotCommentReuse = @"hotCommentReuse";
static NSString *const hot_cityReuse = @"hot_cityReuse";


@interface SearchVC ()
@property (nonatomic, strong) UITableView *myTabelView;
@end

@implementation SearchVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor yellowColor];
    [self getData];
    
    self.myTabelView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain];
    self.myTabelView.backgroundColor = [UIColor whiteColor];
    self.myTabelView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:self.myTabelView];
    
    //成为代理人
    self.myTabelView.delegate = self;
    self.myTabelView.dataSource = self;
    
    //注册
    UINib *nib = [UINib nibWithNibName:@"HotCommentTableCell" bundle:[NSBundle mainBundle]];
    [self.myTabelView registerNib:nib forCellReuseIdentifier:hotCommentReuse];
}
//data
-(void)getData{

}

//cell高
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 280;
}

//cell数
- (NSInteger )tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 20;
}

//建cell
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    HotTravellTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:hotCommentReuse];
    cell.textLabel.text = @"123456";
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//    HotCommentDataVC *hotVC = [[HotCommentDataVC alloc] init];
//    HotCommentModel *model = [self.myArrayM objectAtIndex:indexPath.row];
//    NSLog(@"HotCommentModel *model=============1111==========%@",model.title);
//    hotVC.myUrl = model.appview_url;
//    //模态
//    [self presentViewController:hotVC animated:YES completion:^{
//    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
